#ifndef CLIENTUDP_HPP_
# define CLIENTUDP_HPP_

#include "iostream"
#include "string.h"
#include "string"
#include "stdlib.h"

#include "TimeVal.hpp"
#include "Control.hpp"
#include "FdInfos.hpp"
#include "IAUdp.hpp"
#include "UdpUnix.hpp"
#include "SockInfo.hpp"

class ClientUdp
{
  IAUdp	*Udp;
  FdInfos	FdInfo;
  TimeVal	Tim;
  int	Port;
  char WriteBuf[1024];
  char	ReadBuf[1024];
  int	FdSocketSend;
  int	FdSocketRecv;
  SockInfo SinSource;
  SockInfo SinTargetSend;
  SockInfo SinTargetRcv;
  
  int SendToOrRecvFrom();
  int AddWrite(char *buff,
	       int sizeBuf);

public:
  ClientUdp(int port);
  ~ClientUdp();

  int Run();
};

#endif /*CLIENTUDP_HPP_*/
